<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Home</title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="robots" content="all,follow">
  <!-- Bootstrap CSS-->
  <link rel="stylesheet" href="statics/vendor/bootstrap/css/bootstrap.min.css">
  <!-- Font Awesome CSS-->
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
    integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
  <!-- Google fonts - Popppins for copy-->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,800">
  <!-- orion icons-->
  <link rel="stylesheet" href="statics/css/orionicons.css">
  <!-- theme stylesheet-->
  <link rel="stylesheet" href="statics/css/style.default.css" id="theme-stylesheet">
  <!-- Custom stylesheet - for your changes-->
  <link rel="stylesheet" href="statics/css/custom.css">
  <!-- Favicon-->
  <link rel="shortcut icon" href="img/favicon.png?3">
  <link href="https://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">

</head>

<body>


  <div class="d-flex align-items-stretch">

    <div id="sidebar" class="sidebar py-3">
      <div class="text-gray-400 text-uppercase px-3 px-lg-4 py-4 font-weight-bold small headings-font-family">MAIN</div>
      <ul class="sidebar-menu list-unstyled">
        <li class="sidebar-list-item"><a href="index.jsp" class="sidebar-link text-muted active"><i
              class="o-home-1 mr-3 text-gray"></i><span>用户管理</span></a></li>
        <li class="sidebar-list-item"><a href="#" class="sidebar-link text-muted"><i
              class="o-sales-up-1 mr-3 text-gray"></i><span>部门管理</span></a></li>
        <li class="sidebar-list-item"><a href="#" class="sidebar-link text-muted"><i
              class="o-table-content-1 mr-3 text-gray"></i><span>设备管理</span></a></li>
        <li class="sidebar-list-item"><a href="#" class="sidebar-link text-muted"><i
              class="o-survey-1 mr-3 text-gray"></i><span>文档管理</span></a></li>
        <li class="sidebar-list-item"><a href="#" class="sidebar-link text-muted"><i
              class="o-wireframe-1 mr-3 text-gray"></i><span>系统设置</span></a>
        </li>

      </ul>

    </div>

    <!-- hhh -->
    <!-- 树状菜单部分 -->
    <div class="col-lg-3 mb-5">
      <div class="">
        <div id="treeview4"></div>
      </div>
    </div>
    <!-- 树状菜单部分 end -->


    <!--  表单内容 开始 -->
    <div class="col-lg-6 mb-5">
      <div class="card">
        <div class="card-body">
          <form class="form-inline" action="">
            <div class="form-group">
              <label for="inlineFormInput" class="sr-only">姓名</label>
              <input id="inlineFormInput" type="text" placeholder="姓名" class="mr-3 form-control">
            </div>
            <div class="form-group">
              
              <label for="inlineFormInputGroup" class="sr-only">公司</label>
              <input id="inlineFormInputGroup" type="text" placeholder="公司名称" class="mr-3 form-control">
           
           
            </div>
            <div class="form-group">
              <button type="submit" class="btn btn-primary">Submit</button>
            </div>
          </form>
        </div>
        <div class="card-body">
          <table class="table table-striped table-sm card-text">
            <thead>
              <tr>
                <th>#</th>
                <th>Ename</th>
                <th>Job</th>
                <th>HireDate</th>
                <th>DeptName</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <th scope="row">1</th>
                <td>SCOTT</td>
                <td>ANALYST</td>
                <td>1987-04-19</td>
                <td>开发部</td>
              </tr>
              <tr>
                  <th scope="row">1</th>
                  <td>ALLEN</td>
                  <td>SALESMAN</td>
                  <td>1981-02-20</td>
                  <td>产品部</td>
                </tr>
                <tr>
                    <th scope="row">1</th>
                    <td>JONES</td>
                    <td>MANAGER</td>
                    <td>1981-04-02</td>
                    <td>研发部</td>
                  </tr>
                  <tr>
                      <th scope="row">1</th>
                      <td>MILLER</td>
                      <td>CLERK</td>
                      <td>2018-07-31</td>
                      <td>产品部</td>
                    </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <!-- 表单内容 end -->

  </div>

  <!-- JavaScript files-->
  <script src="statics/vendor/jquery/jquery.min.js"></script>
  <script src="statics/vendor/popper.js/umd/popper.min.js"> </script>
  <script src="statics/vendor/bootstrap/js/bootstrap.min.js"></script>
  <script src="statics/vendor/jquery.cookie/jquery.cookie.js"> </script>
  <script src="statics/js/js.cookie.min.js"></script>
  <script src="statics/js/jquery-2.1.0.min.js"></script>
  <script src="statics/js/bootstrap-treeview.js"></script>

  <script type="text/javascript">
    $(function () {

      $.ajax({
        type:"GET",
        url:"seleKtDept",
        dataType:"json",
        success:function(resultData){
          $('#treeview4').treeview({
            color: "#428bca",
            data: resultData,
            levels: 2, //设置继承树默认展开的级别
            onNodeSelected: function (event, data) {
              // 选中时的事件
              alert("id: "+data.id +"   ===  pid: "+data.pid);
              window.location.href="/user.do?method=view&id="+ data.id+"&pid="+data.pid;
            }

          });

        },
        error:function(data){
          alert("数据加载失败");
        }
      });




    })
  </script>
  <style>
    .list-group-item {
      display: inline-flex !important;
    }
  </style>
</body>

</html>